<? 
	session_start();
	require("connect.php");	
	$mal=$_REQUEST["lopid"];
	$mahs=$_POST["mahs"];
	$maph=$_POST["maph"];
	$tenph=$_POST["tenph"];
	$nghenghiep=$_POST["nghenghiep"];
	$sodt=$_POST["sodt"];
	$email=$_POST["email"];
	$pass=md5($maph);				
	$sql="insert into phuhuynh(maph,mahs,tenph,nghenghiep,sodt,email) values('{$maph}','{$mahs}','{$tenph}','{$nghenghiep}','{$sodt}','{$email}')";		
	mysql_query("$sql") or die("Error!");
	$sql2="insert into nguoidung(username,password,quyen) values('{$maph}','{$pass}','2')";
	mysql_query("$sql2") or die("Error 2!");
	mysql_close();
	header("Location:phuhuynh_admin_lop.php?mal=$mal");
	
?>